﻿<div class="tabs-users tabs-users-left">
    <ul>
        <li><a data-ng-class="{active : activeViewPath==='/users' || isActive('/user') }" href="#/users">Users</a></li>
        <li><a data-ng-class="{active : activeViewPath==='/accounts' || isActive('/account')}" href="#/accounts">Accounts</a></li>
    </ul>
</div>
<div class="tabs-users-right">
    <strong title="dd/mm/yyyy hh:mm"> Last synchronization with CRM: {{lastSyncWithCRM | date:'dd/MM/yyyy HH:mm'  }} </strong>
</div>

<br /><br/>


<div class="user-inputs">
    <form name="accountsFiltersForm">
        <select class="select-box" data-ng-model="status" ng-change="statusChange()" style="width: 49%; margin-right: 29px;">
            <option value="Active">Active Accounts</option>
            <option value="Inactive">Inactive Accounts</option>
            <option value="All">All Accounts</option>
        </select>
        <input type="text" class="search-inp" name="searchText" data-ng-model="accountsForm.searchText" placeholder="Search Account" style="width: 48%;" />
        <input type="submit" value="" ng-click="getAccounts(true)" class="search-btn">
        </form>
</div>
<div class="clear">&nbsp;</div><br /><br />
<div style="display: table; width: 100%;">
    <div class="table-row">
        <div style="width: 50%;" class="table-head"><a ng-class="{sortable_down: checkSortBy('name',false),sortable_up: checkSortBy('name', true)}" data-ng-click="setOrder('name')">Account Name</a></div>
        <div style="width: 15%;" class="table-head"><a ng-class="{sortable_down: checkSortBy('relationshipType',false),sortable_up: checkSortBy('relationshipType', true)}" data-ng-click="setOrder('relationshipType')">Relationship Type</a></div>
        <div style="width: 25%;" class="table-head"><a ng-class="{sortable_down: checkSortBy('accountManagerName',false),sortable_up: checkSortBy('accountManagerName', true)}" data-ng-click="setOrder('accountManagerName')">Account Manager</a></div>
        <div style="width: 9%;" class="table-head"><a ng-class="{sortable_down: checkSortBy('status',false),sortable_up: checkSortBy('status', true)}" data-ng-click="setOrder('status')">Status</a></div>
    </div>
    <!--| orderBy:orderby:descending-->
    <div data-ng-repeat="account in accountsList " class="table-row">
        <div style="width: 50%;" class="table-col"><a href="#/account/{{account.id}}">{{account.name}}</a></div>
        <div style="width: 15%;" class="table-col">{{account.relationshipType}}</div>
        <div style="width: 25%;" class="table-col">{{account.accountManager}}</div>
        <div style="width: 9%;" class="table-col">{{account.status}}</div>
    </div>
    <div data-ng-show="accountsList.length == 0" class="table-row">
        No account found
    </div>
</div><br /><br />

<sustainalytics-pager></sustainalytics-pager>